package com.zxmr.fastjson.filter;

import com.alibaba.fastjson.serializer.PropertyFilter;
import com.zxmr.domain.account.Account;

/**
 * this filter will only serialize id,name for Account Object
 * @author admin
 *
 */
public class AccountSimpleSerializeFilter implements PropertyFilter{

	@Override
	public boolean apply(Object object, String name, Object value) {
		if(object instanceof Account)
		{
			if("name".equals(name) || "id".equals(name))
				return true;
			return false;
		}
		return true;

	}

}
